// 先加载 config 然后再加在头部和尾部
require(['./config'], () => {
    require(['template', 'header', 'footer', 'jqueryShuffling'], (template) => {

        $(function () {
            $(".SlideBox").slide({ mainCell: ".ce ul", autoPlay: true });
        })

        class tuijian{
            constructor(){
                this.dianzhangTuijian()
            }
            dianzhangTuijian(){
                $.get("http://rap2.taobao.org:38080/app/mock/259712/recommend",res =>{
                    if(res.code === 200){

                        this.renderTuijian(res.data)
                    }
                    
                })
            }
            renderTuijian(list){
                const htmlString = template("tuijian_module",{list})
                $("#index_tuijian1").html(htmlString)
                $("#index_tuijian2").html(htmlString)
                $("#index_tuijian3").html(htmlString)
            }
        }
        return new tuijian()
    }),
        require(['jqueryShuffling'], () => {

            $(function () {
                $(".picScroll-left").slide({ titCell: ".hhd ul", mainCell: ".bd ul", autoPage: true, effect: "left", vis: 3 })
            })
        })
})

